<%-
unless @events.nil?
	@events.each do |event|
		if(event.event_type==Event::POST)
%>
		<div id='event<%=event.id%>' class='EventItem'>
			<div  class='EventItem title'>
				<strong><a href="<%=cat_person_path(@cat_id,event.person_id)%>" rel="nofollow"><%=h event.person.name%></a></strong> post an article <a href="<%=cat_article_path(@cat_id,event.item_id)%>"><%=h event.item_title %></a>
			</div>
			<div  class='EventItem body'>
				<%=h event.item_content%>
			</div>
			<div  class='EventItem tail'>
			<%=h event.created_at.to_s(:db)%> <%= link_to cat_article_url(@cat_id,event.item_id),cat_article_path(@cat_id,event.item_id)%>
			</div>
		</div>
<%
		end
		if(event.event_type==Event::COMMENT)
-%>
		<div id='event<%=event.id%>' class='EventItem'>
			<div  class='EventItem title'>
				<strong><a href="<%=cat_person_path(@cat_id,event.person_id)%>" rel="nofollow"><%=h event.person.name%></a></strong> commented on <a href="<%=cat_article_path(@cat_id,event.item_id)%>"><%=h event.item_title %></a>
			</div> 
			<div  class='EventItem body'>
				<%=h event.item_content%>
			</div>
			<div  class='EventItem tail'>
			<%=h event.created_at.to_s(:db)%> <%= link_to cat_article_url(@cat_id,event.item_id),cat_article_path(@cat_id,event.item_id)%>
			</div>
		</div>
<%
		end
	end	
end
-%>